<template>
   <div>
   	   <div class="sidebar">
   	       <el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :collapse="isCollapse" :router="true"> 
   	       	  <!--<el-radio-group v-model="isCollapse" style="margin-bottom: 20px; margin:0 auto;">
				  <el-radio-button :label="false">展开</el-radio-button>
				  <el-radio-button :label="true">收起</el-radio-button>
			  </el-radio-group>-->
		    <!--没有下拉菜单-->
					    <el-menu-item index="/main">
					  		<i class="iconfont my-icon-shouye set-icon" style="font-size:0.4rem;"></i>
					  		<span slot="title">首页</span>
					    </el-menu-item>
			   <!--有下来菜单-->
					    <el-submenu index="/order">
						    <template slot="title">
						      <i class="iconfont my-icon-dingdan set-icon" style="font-size:0.4rem;"></i>
						      <span slot="title">订单</span>
						    </template>
						    <el-menu-item-group>
						      <el-menu-item index="/order/mangement" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-dingdan set-icon"></i>指令管理
						      </el-menu-item>
				              <el-menu-item index="/order/control" ref="tag" @click="addList">
				              	<i class="iconfont my-icon-dingdan set-icon"></i>订单管理
				              </el-menu-item>
						      <el-menu-item index="/order/dispatch" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-tongyidiaodu set-icon"></i>订单调度
						      </el-menu-item>
						      <el-menu-item index="/order/trace" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-dingwei set-icon"></i>订单跟踪
						      </el-menu-item>
						      <el-menu-item index="/order/enquiry" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-xunjia set-icon"></i>订单询价
						      </el-menu-item>
						      <el-menu-item index="/order/import" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-daoru set-icon"></i>订单导入
						      </el-menu-item>
						      <el-menu-item index="/order/receipt" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-huidan set-icon"></i>正本回单
						      </el-menu-item>
						      <el-menu-item index="/order/tracking" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-pilianggenzong set-icon"></i>批量跟踪
						      </el-menu-item>
						      <el-menu-item index="/order/billing" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-kaidan- set-icon"></i>线路开单
						      </el-menu-item>
						      <el-menu-item index="/order/acceptshipper" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-ico_xianxingtubiao_getiaozhongxin_xiaoshoukaidan set-icon"></i>收发货方开单
						      </el-menu-item>
						      <el-menu-item index="/order/batchscheduling" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-piliangtiaodu-copy set-icon"></i>批量调度
						      </el-menu-item>
						    </el-menu-item-group>
					    </el-submenu>
					    <!--地图板块-->
					    <el-submenu index="/map">
						    <template slot="title">
						      <i class="iconfont my-icon-map set-icon" style="font-size:0.4rem;"></i>
						      <span slot="title">地图</span>
						    </template>
						    <el-menu-item-group>
						      <el-menu-item index="/map/scheduling" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-zhihuijiancezhongxin-ditutiaoduguanli set-icon"></i>地图调度
						      </el-menu-item>
						      <el-menu-item index="/map/driverposition" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-pilianggenzong set-icon"></i>司机定位
						      </el-menu-item>
						      <el-menu-item index="/map/trackorders" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-track-line-fill set-icon"></i>订单轨迹
						      </el-menu-item>
						      <el-menu-item index="/map/trackposition" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-dingwei set-icon"></i>订单定位
						      </el-menu-item>
						      <el-menu-item index="/map/linetrack" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-icongenzong set-icon"></i>线路跟踪
						      </el-menu-item>
						    </el-menu-item-group>
					    </el-submenu>
					    <!--财务-->
					    <el-submenu index="/finance">
						    <template slot="title" style="font-size:0.4rem;">
						      <i class="iconfont my-icon-caiwufenxi set-icon"></i>
						      <span slot="title">财务</span>
						    </template>
						    <el-submenu index="4-1">
						      <span slot="title">收支管理</span>
						      <el-menu-item index="/finance/income" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-shou set-icon"></i>收入核算
						      </el-menu-item>
						      <el-menu-item index="/finance/expenditure" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-zhi set-icon"></i>支出核算
						      </el-menu-item>
						      <el-menu-item index="/finance/invoice" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-kaipiao set-icon"></i>开票管理
						      </el-menu-item>
						      <el-menu-item index="/finance/accountant" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-huiji set-icon"></i>会计台账
						      </el-menu-item>
						      <el-menu-item index="/finance/payment" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-shenqing set-icon"></i>付款申请清单
						      </el-menu-item>
						      <el-menu-item index="/finance/runWater" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-liushuiguanli set-icon"></i>财务流水
						      </el-menu-item>
						    </el-submenu>
						    <el-submenu index="4-2">
						      <span slot="title">账单管理</span>
						      <el-menu-item index="/finance/customerbill" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-zhangdan set-icon"></i>客户账单
						      </el-menu-item>
						      <el-menu-item index="/finance/customerpay" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-xianfu set-icon"></i>客户现付
						      </el-menu-item>
						      <el-menu-item index="/finance/customertopay" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-huodaofukuan set-icon"></i>客户到付
						      </el-menu-item>
						      <el-menu-item index="/finance/CarrierBill" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-zhangdan set-icon"></i>承运商账单
						      </el-menu-item>
						      <el-menu-item index="/finance/carrierpay" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-xianfu set-icon"></i>承运商现付
						      </el-menu-item>
						      <el-menu-item index="/finance/carriertopay" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-huodaofukuan set-icon"></i>承运商到付
						      </el-menu-item>
						      <el-menu-item index="/finance/driverbill" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-zhangdan set-icon"></i>司机账单
						      </el-menu-item>
						      <el-menu-item index="/finance/driverpay" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-xianfu set-icon"></i>司机现付
						      </el-menu-item>
						      <el-menu-item index="/finance/drivertoPay" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-huodaofukuan set-icon"></i>司机到付
						      </el-menu-item>
						    </el-submenu>
						    <el-submenu index="4-3">
						      <span slot="title">价格管理</span>
						      <el-menu-item index="/finance/transportprice" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-jiage set-icon"></i>承运价格
						      </el-menu-item>
						      <el-menu-item index="/finance/shippingprice" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-jiage set-icon"></i>托运价格
						      </el-menu-item>
						    </el-submenu>
					    </el-submenu>
					    <!--调整模块-->
					    <el-submenu index="/adjustment">
						    <template slot="title">
						      <i class="iconfont my-icon-tiaozheng set-icon" style="font-size:0.4rem;"></i>
						      <span slot="title">调整</span>
						    </template>
						    <el-menu-item-group>
						      <!--<span slot="title">分组一</span>-->
						      <el-menu-item index="/adjustment/orderadjust" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-dingdan set-icon"></i>订单调整
						      </el-menu-item>
						      <el-menu-item index="/adjustment/customerbilladjust" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-qian1 set-icon"></i>客户账单调整
						      </el-menu-item>
						      <el-menu-item index="/adjustment/carrierbilladjust" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-qian1 set-icon"></i>承运商账单调整
						      </el-menu-item>
						      <el-menu-item index="/adjustment/documentdeleted" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-shanchu set-icon"></i>单据删除
						      </el-menu-item>
						      <el-menu-item index="/adjustment/quickorderadjustment" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-kuaisu set-icon"></i>订单快速调整
						      </el-menu-item>
						      <el-menu-item index="/adjustment/abnormal" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-yichang set-icon"></i>送达异常
						      </el-menu-item>
						      <el-menu-item index="/adjustment/log" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-rizhi set-icon"></i>操作日志
						      </el-menu-item>
						    </el-menu-item-group>
					    </el-submenu>
					    <!--资源模块-->
					    <el-submenu index="/resource">
						    <template slot="title">
						      <i class="iconfont my-icon-resource set-icon" style="font-size:0.4rem;"></i>
						      <span slot="title">资源</span>
						    </template>
						    <el-submenu index="6-1">
						      <span slot="title">基础信息</span>
						      <el-menu-item index="/resource/companys" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-jiage set-icon"></i>合作公司
						      </el-menu-item>
						      <!--<el-menu-item index="6-1-2">
						      	<i class="iconfont my-icon-jiage set-icon"></i>邀请合作
						      </el-menu-item>
						      <el-menu-item index="6-1-3">
						      	<i class="iconfont my-icon-jiage set-icon"></i>中转站
						      </el-menu-item>
						      <el-menu-item index="6-1-4">
						      	<i class="iconfont my-icon-jiage set-icon"></i>线路管理
						      </el-menu-item>
						      <el-menu-item index="6-1-5">
						      	<i class="iconfont my-icon-jiage set-icon"></i>中转策略
						      </el-menu-item>
						      <el-menu-item index="6-1-6">
						      	<i class="iconfont my-icon-jiage set-icon"></i>短信板块配置
						      </el-menu-item>-->
						    </el-submenu>
						    <el-submenu index="6-2">
						      <span slot="title">司机车辆</span>
						      <el-menu-item index="/resource/drivermessage" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-jiage set-icon"></i>司机信息
						      </el-menu-item>
						      <el-menu-item index="/resource/vehiclemessage" ref="tag" @click="addList">
						      	<i class="iconfont my-icon-jiage set-icon"></i>车辆信息
						      </el-menu-item>
						      <!--<el-menu-item index="6-2-3">
						      	<i class="iconfont my-icon-jiage set-icon"></i>油卡管理
						      </el-menu-item>
						      <el-menu-item index="6-2-4">
						      	<i class="iconfont my-icon-jiage set-icon"></i>设备管理
						      </el-menu-item>-->
						    </el-submenu>
					    </el-submenu>
					    <!--报表模块-->
					    <el-submenu index="7">
						    <template slot="title">
						      <i class="iconfont my-icon-baobiao1 set-icon" style="font-size:0.4rem;"></i>
						      <span slot="title">报表</span>
						    </template>
						    <el-menu-item-group>
						      <el-menu-item index="7-1">
						      	<i class="iconfont my-icon-jiage set-icon"></i>电子看板
						      </el-menu-item>
						      <el-menu-item index="7-2">
						      	<i class="iconfont my-icon-jiage set-icon"></i>运营报表
						      </el-menu-item>
						      <el-menu-item index="7-3">
						      	<i class="iconfont my-icon-jiage set-icon"></i>结算报表
						      </el-menu-item>
						      <el-menu-item index="7-4">
						      	<i class="iconfont my-icon-jiage set-icon"></i>订单统计
						      </el-menu-item>
						      <el-menu-item index="7-5">
						      	<i class="iconfont my-icon-jiage set-icon"></i>异常订单
						      </el-menu-item>
						      <el-menu-item index="7-6">
						      	<i class="iconfont my-icon-jiage set-icon"></i>订单调用
						      </el-menu-item>
						      <el-menu-item index="7-7">
						      	<i class="iconfont my-icon-jiage set-icon"></i>基础业务报表
						      </el-menu-item>
						      <el-menu-item index="7-8">
						      	<i class="iconfont my-icon-jiage set-icon"></i>订单状态统计
						      </el-menu-item>
						      <el-menu-item index="7-9">
						        <i class="iconfont my-icon-jiage set-icon"></i>运输费用报表
						      </el-menu-item>
						      <el-menu-item index="7-10">
						      	<i class="iconfont my-icon-jiage set-icon"></i>短信统计报表
						      </el-menu-item>
						      <el-menu-item index="7-11">
						      	<i class="iconfont my-icon-jiage set-icon"></i>自定义报表
						      </el-menu-item>
						      <el-menu-item index="7-12">
						      	<i class="iconfont my-icon-jiage set-icon"></i>订单明细报表
						      </el-menu-item>
						    </el-menu-item-group>
					    </el-submenu>
					    <!--设置模块-->
					    <el-submenu index="8">
						    <template slot="title">
						      <i class="iconfont my-icon-shezhi set-icon" style="font-size:0.4rem;"></i>
						      <span slot="title">设置</span>
						    </template>
						    <el-menu-item-group>
						      <el-menu-item index="8-1">
						      	<i class="iconfont my-icon-jiage set-icon"></i>字典维护
						      </el-menu-item>
						      <el-menu-item index="8-2">
						      	<i class="iconfont my-icon-jiage set-icon"></i>公司管理
						      </el-menu-item>
						      <el-menu-item index="8-3">
						      	<i class="iconfont my-icon-jiage set-icon"></i>编码规则
						      </el-menu-item>
						      <el-menu-item index="8-4">
						      	<i class="iconfont my-icon-jiage set-icon"></i>角色管理
						      </el-menu-item>
						      <el-menu-item index="8-5">
						      	<i class="iconfont my-icon-jiage set-icon"></i>账户管理
						      </el-menu-item>
						      <el-menu-item index="8-6">
						      	<i class="iconfont my-icon-jiage set-icon"></i>审批设置
						      </el-menu-item>
						      <el-menu-item index="8-7">
						      	<i class="iconfont my-icon-jiage set-icon"></i>预警配置
						      </el-menu-item>
						      <el-menu-item index="8-8">
						      	<i class="iconfont my-icon-jiage set-icon"></i>系统配置
						      </el-menu-item>
						      <el-menu-item index="8-9">
						      	<i class="iconfont my-icon-jiage set-icon"></i>打印模板配置
						      </el-menu-item>
						      <el-menu-item index="8-10">
						      	<i class="iconfont my-icon-jiage set-icon"></i>车载对接配置
						      </el-menu-item>
						      <el-menu-item index="8-11">
						      	<i class="iconfont my-icon-jiage set-icon"></i>扩展字段
						      </el-menu-item>
						      <el-menu-item index="8-12">
						      	<i class="iconfont my-icon-jiage set-icon"></i>重泡规则管理
						      </el-menu-item>
						    </el-menu-item-group>
					    </el-submenu>
					    <!--服务模块-->
					    <el-submenu index="9">
						    <template slot="title">
						      <i class="iconfont my-icon-ic_services set-icon" style="font-size:0.4rem;"></i>
						      <span slot="title">服务</span>
						    </template>
						    <el-menu-item-group>
						      <el-menu-item index="9-1">
						      	<i class="iconfont my-icon-jiage set-icon"></i>短信发送日志
						      </el-menu-item>
						    </el-menu-item-group>
					    </el-submenu>
			</el-menu>
	   </div>
   </div>
</template>

<script>
export default {
    data() {
      return {
        isCollapse: false,
				data : null
      };
    },
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath)
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath)
      },
      addList(e){
				// console.log(e.$options.propsData.index);
				 var _this=this
      	const tags = this.$refs.tag
				console.log(tags.$el.baseURI);
				// console.log(tags);
				// console.log(tags.$el.baseURI);
      	//  this.$nextTick(()=>{
				//  	_this.data =window.location.href;
				//  	this.$emit('chlic',_this.data)
    		 //console.log(this.$route.path)
      	// })
      }
    },
    mounted(){
  	this.addList()
    }
  }
</script>

<style scoped>
.sidebar >>> .el-menu-item-group .el-menu-item-group__title{
	display: none;
}
.sidebar{
	float:left;
	min-width:0;
	display:flex;
	width:4.52rem!important;
	position:fixed;
	bottom:0;
	left:0;
	top:1.2rem;
}
.el-menu-vertical-demo{
    width:100%;
    height:100%;
    box-sizing: border-box;
    overflow-y: auto;
}
.sidebar .el-menu{
	height:100%;
}
.set-icon{
	vertical-align: middle;
    margin-right: 0.1rem;
    width:0.48rem;
    text-align: center;
    display: inline-block;
}

</style>